package com.shinbada.modules.competitor.mapper;

import com.shinbada.modules.competitor.entity.DTO.CompetitorControlDTO;
import com.shinbada.modules.competitor.entity.VO.CompetitorControlResultVO;
import org.springframework.stereotype.Repository;
import com.shinbada.core.persistence.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.shinbada.modules.competitor.entity.CompetitorControl;

import java.util.List;

/**
 * 控制器MAPPER接口
 * @author initcap
 * @version 2021-08-05
 */
@Mapper
@Repository
public interface CompetitorControlMapper extends BaseMapper<CompetitorControl> {
    /**
     * 根据筛选条件获取控制器结构树
     * @param competitorControlDTO
     * @return
     */
    List<CompetitorControlResultVO> getControlTreeStructure(CompetitorControlDTO competitorControlDTO);

    /**
     * 根据本体id获取所有控制器
     * @param noumenonId
     * @return
     */
    List<CompetitorControl> getControlByNoumenonId(String noumenonId);

    /**
     * 根据本体型号获取所有相关的控制器
     * @param model
     * @return
     */
    List<CompetitorControl> getControlByNoumenonModel(String model);
}
